#pragma once
#ifndef __MY_CONSUMER__
#define __MY_CONSUMER__

#include "../mqcommon/message.pb.h"
#include "../mqcommon/helpper.hpp"

#include <iostream>
#include <string>
#include <memory>
#include <mutex>
#include <functional>
#include <unordered_map>

namespace NS_Consumer
{
    using ConsumerCallback = std::function<void(const std::string &, const NS_Message::MessageProperties *, const std::string &)>;
    struct Consumer
    {
        using Ptr = std::shared_ptr<Consumer>;
        Consumer() {}
        Consumer(const std::string &tag, const std::string &qname, bool auto_ack, ConsumerCallback cb)
            : _tag(tag), _qname(qname), _auto_ack(auto_ack), _callback(std::move(cb))
        {
        }

        ~Consumer() {}
        std::string _tag;
        std::string _qname;
        bool _auto_ack;
        ConsumerCallback _callback;
    };
}
#endif